package net.zoneland.knowledge.model;

import java.io.Serializable;
import java.time.LocalDateTime;


import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import net.zoneland.knowledge.utils.DateHelper;

/**
 * 会议(二维码).
 * @author chw.
 * @version V1.0
 * 2022-11-17
 */
@Data
public class MeetingQr implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID.
     */
    private String id;

    /**
     * 会议标题.
     */
    private String meetingTitle;

    /**
     * 会议时间.
     */
    @DateTimeFormat(pattern = DateHelper.DATE_PATTERN_WITHOUT_SECOND)  //接收从页面传到后台的日期值
    @JsonFormat(pattern = DateHelper.DATE_PATTERN_WITHOUT_SECOND, timezone = "GMT+8")  //从后台向前台传递日期值
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime meetingDate;

    /**
     * 会议结束时间.
     */
    @DateTimeFormat(pattern = DateHelper.DATE_PATTERN_WITHOUT_SECOND)   //接收从页面传到后台的日期值
    @JsonFormat(pattern = DateHelper.DATE_PATTERN_WITHOUT_SECOND, timezone = "GMT+8")  //从后台向前台传递日期值
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime meetingEndDate;
    /**
     * 会议内容.
     */
    private String meetingContent;

    /**
     * 会议地点.
     */
    private String meetingAddress;

    /**
     * 会议二维码.
     */
    private byte[] meetingQrCode;

    /**
     * 创建人ID.
     */
    private String creatorId;

    /**
     * 创建人名称.
     */
    private String creatorName;

    /**
     * 创建人部门dn.
     */
    private String departmentDn;

    /**
     * 公司名称.
     */
    private String companyName;

    /**
     * 公司ID.
     */
    private String companyId;

    /**
     * 创建时间.
     */
    @DateTimeFormat(pattern = DateHelper.CHINA_DATE_FORMAT_STR)
    @JsonFormat(pattern = DateHelper.CHINA_DATE_FORMAT_STR)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime createTime;

    /**
     * 最后修改时间.
     */
    @DateTimeFormat(pattern = DateHelper.CHINA_DATE_FORMAT_STR)
    @JsonFormat(pattern = DateHelper.CHINA_DATE_FORMAT_STR)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime lastModified;

    /**
     * 状态，1-已删除，0-未删除
     */
    private boolean status;

    /**
     * 导入人员人数
     */
    private int importCount;

    /**
     * 签到人数
     */
    private int signCount;

    /**
     * 签到人员ID.
     */
    private String signInUserId;

    /**
     * 签到人员名称.
     */
    private String signInUserName;

    /**
     * 签到时间.
     */
    @DateTimeFormat(pattern = DateHelper.CHINA_DATE_FORMAT_STR)
    @JsonFormat(pattern = DateHelper.CHINA_DATE_FORMAT_STR)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime signInDate;

    /**
     * 会议id.
     */
    private String meetingId;

    /**
     * 短信提醒, 1-设置提醒 0-未设置提醒
     */
    private boolean smsRemind;

    /**
     * 短信通知内容.
     */
    private String smsContent;

    /**
     * 短信提前几分钟发送.
     */
    private int smsAdvanceSend;

    /**
     * 电话提醒, 1-设置提醒 0-未设置提醒
     */
    private boolean phoneRemind;

    /**
     * 手机通知内容.
     */
    private String phoneContent;

    /**
     * 电话提前几分钟发送.
     */
    private int phoneAdvanceSend;

}
